package com.daoos.swagger;

import java.util.Collections;

import javax.servlet.http.Cookie;

import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;

public class MonitorControllerSnippet {

	/**
	 * 抽象类
	 */
	abstract static class BaseMonitorControllerSnippet extends ASnippet {

		public MultiValueMap<String, String> getParams() {
			MultiValueMap<String, String> parameters = new LinkedMultiValueMap<>();
			parameters.put("Version", Collections.singletonList("2016-07-26"));
			parameters.put("Region",
					Collections.singletonList("cn-shanghai-3"));
			parameters.put("Service", Collections.singletonList("monitor"));

			return parameters;
		}

		@Override
		public Cookie[] getCookie() {
			Cookie cookie = new Cookie("",
					"046011086e3e617b98b7a6aa4cae88fc-668349870");
			return new Cookie[] {
					cookie
			};
		}
	}

	/**
	 * get方法的
	 */
	public static class Get extends BaseMonitorControllerSnippet {
		public MultiValueMap<String, String> getParams() {
			MultiValueMap<String, String> parameters = super.getParams();
			parameters.put("name", Collections.singletonList("kaddefault"));
			parameters.put("instance", Collections
					.singletonList("0faae51b-e91f-4583-b83e-6b696d03d6b1"));
			parameters.put("producttype", Collections.singletonList("12"));

			return parameters;
		}

	}
}